name="exception"
# s="hello"
# try:
#     print(s[10])
# except IndexError:
#     print("error")
# else:
#     print("no error")

'''
try:
    f=open('base1.py','r')
    fr=f.read()
    print(fr)
finally:
    f.close()
'''
with open("t",'r') as f:
    fr=f.read()
    print(fr)
'''
抛出异常
raise 异常名字
raise 异常名字(附加信息)

assert 语句 (True/False)

'''
#
# if 1:
#     raise NameError("you name error")
#
# l=[]
# assert len(l),"len glt 1"



